(function () {
	const response = {
		"type": "page",
		"body": [
			{
				"label": "新增",
				"type": "button",
				"actionType": "dialog",
				"level": "primary",
				"className": "m-b-sm",
				"dialog": {
					"title": "新增表单",
					"body": {
						"type": "form",
						"api": "post:/api/adminuser",
						"body": [
							{
								"type": "input-text",
								"name": "UserName",
								"label": "用户名",
								"required": true
							},
							{
								"type": "input-password",
								"name": "Password",
								"label": "密码",
								"required": true
							},
							{
								"type": "input-text",
								"name": "Remark",
								"label": "备注",
							}
						]
					}
				}
			},
			{
				"type": "crud",
				"api": {
					"url": "/api/adminuser/page",
					"method": "post"
				},
				"syncLocation": false,
				"autoGenerateFilter": true,
				"columns": [
					{
						"name": "Id",
						"label": "ID",
					},
					{
						"name": "UserName",
						"label": "用户名",
						"searchable": true
					},
					{
						"name": "CreateTime",
						"label": " 创建时间"
					},
					{
						"name": "UpdateTime",
						"label": "更新时间"
					},
					{
						"name": "Remark",
						"label": "备注"
					},
					{
						"name": "Password",
						"label": "密码"
					},
					{
						"type": "operation",
						"label": "操作",
						"width": "120px",
						"buttons": [
							{
								"label": "修改",
								"type": "button",
								"actionType": "drawer",
								"drawer": {
									"title": "修改表单",
									"body": {
										"type": "form",
										"initApi": "get:/api/adminuser/${Id}",
										"api": "put:/api/adminuser",
										"body": [
											{
												"type": "hidden",
												"name": "Id",
											},
											{
												"type": "input-text",
												"name": "UserName",
												"label": "用户名",
												"required": true
											},
											{
												"type": "input-text",
												"name": "Remark",
												"label": "备注"
											},
											{
												"type": "input-text",
												"name": "Password",
												"label": "密码",
												"required": true
											}
										]
									}
								}
							},
							{
								"label": "删除",
								"hiddenOn": "this.UserName=='admin'",
								"type": "button",
								"actionType": "ajax",
								"level": "danger",
								"confirmText": "确认要删除？",
								"api": "delete:/api/adminuser/${Id}"
							},
						]
					},

				]
			}]
	}

	window.jsonpCallback && window.jsonpCallback(response);
})();
